{% extends "./tmplinfo.html" %}
{% block headinfo %}
<link rel="stylesheet" href="{{ static_url('f2elib/bootstrap-star-rating-master/css/star-rating.css') }}"
      type="text/css"
      media="all">
<script type="text/javascript" src="{{ static_url('f2elib/bootstrap-star-rating-master/js/star-rating.js') }}"></script>
{% end %}
{% block typebody %}

<script>
    var post_uid = "{{ postinfo.uid }}";
    var login = {{ kwd['login']}};
</script>
<div class="row">
    <div class="col-sm-9">
        <ol class="breadcrumb"
            style="display: block;overflow: hidden; text-overflow:ellipsis; white-space: nowrap;line-height: 38px">
            <li>{{ _('Current location') }}: <a href="{% module site_url() %}">{{ _('Home') }}</a></li>
            <li><a href="/filter/{{ pcatinfo.uid }}">{{ pcatinfo.name }}</a></li>
            {% if catinfo %}
            <li><a href="/filter/{{ catinfo.uid }}">{{ catinfo.name }}</a></li>
            {% end %}
            {% if postinfo %}
            <li><a href="/{{ kwd['router'] }}/{{ postinfo.uid }}"> {{ postinfo.title }}</a></li>
            {% end %}
        </ol>
        <div class="panel panel-black">
            <div class="panel-heading">
                <h3 class="listinfo_title">
                    {{ postinfo.title }}
                </h3>
            </div>
            <div class="panel-body">
                <div class="row">
                    {% if postinfo.logo != '' %}
                    <div class="col-sm-12 bor_bottom ">
                        <div class="col-sm-6 ">
                            <img src="{{ postinfo.logo }}" class="img-thumbnail">
                        </div>
                        <div class="col-sm-6">


                            {% if userinfo %}
                            {% module collect(userinfo.uid, postinfo.uid, en=True) %}
                            {% end %}

                            {% module widget_editor(kwd['router'], postinfo.uid, userinfo,url='filter',kind = postinfo.kind) %}


                            <br>


                            <p><strong>{{ _('Tag') }}</strong> <span class="post_label">
                     {% module post_labels(post_uid = postinfo.uid) %}
                </span><br>
                                <span class="split">  <strong>{{ _('Author') }} </strong>: {{ postinfo.user_name }} </span>&nbsp;<br>


                                <strong>{{ _('Release time') }}</strong> {{ str(postinfo.date)[:10] }}<br>
                                <strong>{{ _('Browsing times') }}</strong> {% raw postinfo.view_count %}</p>

                            {% if postinfo.extinfo.get('tag__file_download') %}
                            <p style="float:right;">
                                <a class="btn btn-danger btn-sm"
                                   onclick="entity_down('{{ postinfo.uid }}')" target="_blank">
                                    <span class="glyphicon glyphicon-download-alt"> </span>
                                    {{ _('Download Dataset') }}</a></p>
                            {% else %}
                            {% end %}

                            {% if postinfo.extinfo.get('ext_pdf') %}
                            <p><a class="btn btn-info btn-sm"
                                  href="{{ postinfo.extinfo.get('ext_pdf','') }}" target="_blank">
                                <span class="glyphicon glyphicon-new-window"> </span>
                                {{ _('View Document') }}</a></p>

                            {% end %}
                        </div>

                    </div>
                    <div class="col-sm-12 bor_bottom">
                        <p>
                            {% block extrainfo %} {% end %}</p></div>
                    {% else %}
                    <div class="col-sm-12 bor_bottom">
                        <div class="row">
                            <div class="col-sm-12">
                                {% if userinfo %}
                                {% module collect(userinfo.uid, postinfo.uid, en=True) %}
                                {% end %}

                                {% module widget_editor(kwd['router'], postinfo.uid, userinfo,kind = postinfo.kind,url='filter') %}
                            </div>

                        </div>


                        <br>
                        <br>
                        <p><strong>{{ _('Tag') }}</strong> <span class="post_label">
                     {% module post_labels(post_uid = postinfo.uid) %}
                </span>
                            <strong>{{ _('Release time') }}</strong>
                            {{ str(postinfo.date)[:10] }}
                            &nbsp;&nbsp;&nbsp;&nbsp;<strong>{{ _('Browsing times') }}</strong>
                            {% raw postinfo.view_count %}&nbsp;&nbsp;&nbsp;&nbsp; </p>
                        {% if postinfo.extinfo.get('tag__file_download') %}
                        <p style="float:right;">
                            <a class="btn btn-danger btn-sm" onclick="entity_down('{{ postinfo.uid }}')"
                               target="_blank">
                                <span class="glyphicon glyphicon-download-alt"> </span>
                                {{ _('Download Dataset') }}</a></p>
                        {% else %}
                        {% end %}

                        {% if postinfo.extinfo.get('ext_pdf') %}
                        <p><a class="btn btn-info btn-sm"
                              href="{{ postinfo.extinfo.get('ext_pdf','') }}" target="_blank">
                            <span class="glyphicon glyphicon-new-window"> </span>
                            {{ _('View Document') }}</a></p>
                        {% else %}
                        {% end %}
                        <p>
                            {% block extrainfo %} {% end %}</p>
                    </div>

                    {% end %}
                    <div class="col-sm-12">
                        <div class="entry">
                            <div class="listinfo_content">
                                {% raw unescape(postinfo.cnt_html) %}
                            </div>
                        </div>
                    </div>
                </div>

            </div>

            <div class="panel-footer">
                <div class="row">
                    <div class="col-md-12"
                         style="display: block;overflow: hidden; text-overflow:ellipsis; white-space: nowrap;">
                        {{ _('Article link') }}：
                        <a href="/{{ kwd['router'] }}/{{ postinfo.uid }}"
                           style=" color: #003366;">
                            {{ postinfo.title }}
                        </a>
                    </div>

                </div>
            </div>
        </div>
    </div>
    <div class="col-sm-3">
        <div class="panel panel-black">
            <div class="panel-heading">
                <b> {{ _('Information evaluation') }}</b>
            </div>
            <div class="panel-body" style="font-size: x-small">
                {% module star_rating(postinfo, userinfo) %}
            </div>
        </div>
        <div class="panel panel-black">
            <div class="panel-heading">
                {{ _('Most attention') }}
            </div>
            <ul class="list-group" id="mostall">
                {% module post_most_view(5, with_date = False, with_catalog= False,kind=postinfo.kind) %}
            </ul>
        </div>
        <div class="panel panel-black">
            <div class="panel-heading">
                {{ _('Recent articles') }}
            </div>
            <ul class="list-group">
                {% module post_recent(5, with_date = False, with_catalog= False,kind=postinfo.kind) %}
            </ul>
        </div>

        <div class="panel panel-black">
            <div class="panel-heading"> {% for taginfo in cat_enum %}
                {% if taginfo.uid.endswith('00') %}
                {{ taginfo.name }}
                {% end %}
                {% end %}
            </div>
            <ul class="list-group">
                {% for taginfo in cat_enum %}
                {% if not taginfo.uid.endswith('00') %}
                <li class="list-group-item"><a href="/list/{{ taginfo.uid }}">{{ taginfo.name }}</a></li>
                {% end %}
                {% end %}
            </ul>
        </div>
    </div>
</div>


{% end %}



